The present invention relates to an over-sampling A/D (analog/digital) conversion apparatus and an over-sampling D/A (digital/analog) conversion apparatus, and in particular it relates to the setting function of a sampling frequency and an over-sampling rate.
There have been used an over-sampling A/D conversion technique and an over-sampling D/A conversion technique in which sampling is performed of a certain signal with a higher sampling frequency than a predetermined sampling frequency (Hereinafter the higher sampling frequency will be referred to as an over-sampling frequency for the purpose of discriminating it from the predetermined sampling frequency) to obtain the predetermined sampling frequency in thinning the sampled data by filtering in a digital manner.
According to the above technique, the quantization noise caused by a conversion error of an A/D or a D/A converter can be driven out to a higher frequency range, so that it is made possible to convert a signal at a higher degree of accuracy than that of the A/D or D/A converter to be used. In other words, the conversion accuracy requested to the A/D, or D/A converter for obtaining a predetermined conversion accuracy is lightened.
Further, according to the above-mentioned technique, the sampling is performed at a higher frequency than the predetermined sampling frequency, so that a Nyquist frequency, that is, an aliasing frequency at which aliasing is generated in a case of sampling becomes also high. Therefore, the characteristics requested to a prefilter for cutting-off frequencies higher than the Nyquist frequency at an A/D conversion is also lightened.
As mentioned in the above, in using A/D, D/A conversion technique by over-sampling, conversion accuracy can be upgraded and also the required characteristics for analog filters such as prefilters can be largely lightened.
In order to utilize the above mentioned A/D and D/A converters by conventional technique in various ways, sampling by various frequencies must be possible. In particular, in the case of a modem for performing data communications through telephone lines, where the communication speed has to be variable corresponding to the states of a communication line or to the kind of a protocol being supported by a person to communicate with, sampling by various frequencies must be possible. For that purpose, in many cases, operational parameters such as the sampling frequencies are arranged to be set at variable frequencies. There have been two setting methods as a related art in classifying roughly: a first method as shown in FIG. 11 in which the over-sampling frequency is variable and the over-sampling ratio is fixed (bibliographies: xe2x80x9cUCB1100 Data Sheetxe2x80x9d, Phillips, xe2x80x9cTLC320AD50C Data Manualxe2x80x9d, Texas Instrument, etc.), and a second method as shown in FIG. 13 in which both over-sampling frequency and over-sampling ratio are variable (bibliographies: xe2x80x9cSTLC7550 Data sheetxe2x80x9d, SGS-Thomson, etc.).
In the first method, the ratio of the over-sampling frequency to the sampling frequency is constant. Therefore, utilizing the characteristics of a digital filter whose frequency characteristic is scaled by an operating frequency, if a decimator is operated at an over-sampling frequency, the frequency characteristic of the decimator which attenuates the frequencies by higher than xc2xd of the sampling frequency can be realized with a digital filter having a set of filtering coefficients.
On the other hand, according to the second method, since the over-sampling ratio is variable, it is possible to select an over-sampling frequency having the best characteristics concerning an arbitrary sampling frequency and to bring out an optimum characteristic. However, in this method, the ratio of the over-sampling frequency to the sampling frequency is not constant, so that it is not possible to utilize the frequency characteristic of a digital filter which is scaled by an operating frequency, and the coefficients of digital filters have to be designed for every sampling ratio, the filters which compose a decimator.
In these methods, the numbers of operating parameters to be set are different from each other, so that the configurations of registers for setting the operating parameters are naturally different as shown in FIGS. 12, 14 and 16. Therefore, it is not possible to make a system of hardware operate in controlling correctly using the software developed for another system of hardware. Therefore, it has been impossible to use a system of hardware in place of another system of hardware.
In consideration of the above circumstances, the object of the present invention is to offer the hardware to be used for an over-sampling A/D or D/A converter which can be operated with the software developed for either system of hardware. When the object of the present invention is achieved, it is made possible to realize a system of hardware which is able to replace the hardware developed for either method, which will lead to the cost down of the hardware by mass production.
In order to solve the problem in the conventional technique, following means are taken in the present invention.
(1) The case where hardware has a configuration in which an over-sampling ratio is constant:
(a) In the case where hardware is operated with software based on the first method in which the over-sampling ratio is constant, a frequency dividing ratio is changed to a frequency dividing ratio and an over-sampling ratio, and the original oscillation frequency is divided based on the changed frequency dividing ratio and the over-sampling ratio, and a decimator is set at the changed over-sampling ratio.
(b) In the case where hardware is operated with software based on the second method in which the over-sampling ratio is variable, the original oscillation frequency is divided based on the frequency dividing ratio and the over-sampling ratio written or a register by the software, and the decimator is set at the written over-sampling ratio.
(2) The case where the hardware has a configuration in which over-sampling ratio is variable:
(a) In the case where hardware is operated with the software based on the first method in which the over-sampling ratio is constant, a frequency dividing ratio is changed to a frequency dividing ratio and an over-sampling ratio, and the original oscillation frequency is divided based on the changed frequency dividing ratio and the over-sampling ratio, and a decimeter is set at the changed over-sampling ratio.
(b) In the case where hardware is operated with the software based on the second method in which the over-sampling ratio is variable, the original oscillation frequency is divided based on the frequency dividing ratio and the over-sampling ratio written on a register by the software, and the decimeter is set at the written over-sampling ratio.
In short, by converting the parameters in a register, it is made possible to make the hardware in which the over-sampling ratio is fixed be operated with either of the software corresponding to the first method in which the over-sampling ratio is fixed or corresponding to the second method in which the over-sampling ratio is variable.